#include <fstream>

struct point
{
	int x, y;
};

point next_point(point A, int &length, int &direction, bool &vertical)
{
	point res;
	res.x = A.x;
	res.y = A.y;

	switch(direction % 4)
	{
		case 0:
			res.x += length;
			break;
		case 1:
			res.y += length;
			break;
		case 2:
			res.x -= length;
			break;
		case 3:
			res.y -= length;
			break;
	}

	if (vertical)
		length++;
	vertical = !vertical;
	direction++;

	return res;
}

int main()
{
	std::ifstream input("in.txt");
	std::ofstream output("out.txt");

	int n;
	input >> n;

	if (n > 0)
	{
		point A;
		A.x = 0;
		A.y = 0;
		int length = 1;
		int direction = 0;
		bool vertical = 0;

		for (int i = 0; i < n; i++)
		{
			output << A.x << " " << A.y << "\n";
			A = next_point(A, length, direction, vertical);			
		}		
	}
	
	return 0;
}